package com.byzk.p2p.admin.admin.vo;

import com.byzk.p2p.admin.admin.dao.AdminDao;
import com.byzk.p2p.admin.admin.dto.SysUser;
import com.byzk.p2p.admin.system.vo.MenuItem;

import org.springframework.security.core.GrantedAuthority;
import java.util.Collection;
import java.util.List;

public class SecurityUser extends org.springframework.security.core.userdetails.User {

	private static final long serialVersionUID = 1L;
	
	private SysUser user;

	private AdminDao adminDao;
	
	private List<MenuItem> menus;

    public SecurityUser(SysUser user,List<MenuItem> menus, String username, String password, 
    		Collection<? extends GrantedAuthority> authorities, AdminDao adminDao) {
        super(username, password, authorities);
        this.menus=menus;
        this.user = user;
		this.adminDao = adminDao;
    }

	public SysUser getUser() {
		return user;
	}

	public List<MenuItem> getMenus() {
		return menus;
	}

	public AdminDao getAdminDao() {
		return adminDao;
	}
}
